"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const path_1 = require("path");
const multer_1 = require("multer");
const config_1 = require("@nestjs/config");
// import * as moment from 'moment';
exports.default = (0, config_1.registerAs)('file', () => ({
    root: (0, path_1.join)(process.cwd(), './uploads'),
    storage: (0, multer_1.diskStorage)({
        destination: (0, path_1.join)(process.cwd(), `./uploads`),
        filename: (req, file, cb) => {
            const filename = `${new Date().getTime()}.${file.mimetype.split('/')[1]}`;
            return cb(null, filename);
        },
    }),
}));
